<?php include("config.php"); 

function menu(){
   	connect();
	$bdd = $GLOBALS['bdd'];
	$reponse = $bdd->query('SELECT * FROM menu');
	?>
	<!-- debut de la div contenant le menu -->
	<div class="menu4">
		<ul>
	
	<?php
	
	while( $donnees = $reponse->fetch() )
    {
    ?>
   		<!-- a chaque fois qu'on trouve un enregistrement, on l'ajoute dans le menu -->
		<li>
        	<img src="<?php echo $donnees["image_menu"] ?>" /><a href="<?php echo $donnees["adresse_menu"] ?>"><?php echo $donnees['libelle_menu'] ?></a>
        </li>
    <?php
    }
    
    $reponse->closeCursor(); // Termine le traitement de la requête
	
	?>

        </div>
   <!-- 
			<li><a>L'école</a>
			  <ul>
				<li><a href="etablissement.php">L'établissement</a></li>
				<li><a href="promotion.php">Promotion</a></li>
				<li class="last"><a href="motivations.php">Motivations</a></li>
			  </ul>
			</li>
			<li><a>Personnel</a>
			  <ul>
				<li><a href="cv.php">CV</a></li>
				<li><a href="activites.php">Activités</a></li>
				<li class="last"><a href="projets.php">Réalisation</a></li>
			  </ul>
			</li>
			<li ><a>Documents</a>
			  <ul>
				<li><a href="documents/sources.zip">Sources</a></li>
				<li class="last"><a href="biblio.php">Aide</a></li>
			  </ul>
			</li>
			<li><a href="livreor.php"><img src="58131c.jpg" width="30px" height="30px" />Livre d'or</a></li>
			<li><a href="contact.php"><img src="638772.gif" width="30px" height="30px" />Me joindre</a></li>
		  
		  <img class="ombre" src="images/menu/ombrepng.png" alt="ombre" /> </div>
		
		
		
		
		<span id="heure">
		 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="20">
			<param name="movie" value="Scripts/datetime.swf">
			<param name="quality" value="high">
			<param name="wmode" value="transparent"> 
			<embed wmode="transparent" src="Scripts/datetime.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="20"></embed>
			</object>
		</span>
		-->
		
<?php } ?>


